x86/hvm: track large memory mapped accesses by buffer offset
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 9 Jul 2015 17:15:00 +0000 (19:15 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 10 Jul 2015 08:22:08 +0000 (10:22 +0200)
commite101123463d293408435d57cf51d274aea884856
tree9f27150fbdd7f91a52663a9567ba1b57fd726415
parenta9320fef57c74f83e7bdd8bcaa94da7aa64deac5
x86/hvm: track large memory mapped accesses by buffer offset

The code in hvmemul_do_io() that tracks large reads or writes, to avoid
re-issue of component I/O, is defeated by accesses across a page boundary
because it uses physical address. The code is also only relevant to memory
mapped I/O to or from a buffer.

This patch re-factors the code and moves it into hvmemul_phys_mmio_access()
where it is relevant and tracks using buffer offset rather than address.
Separate I/O emulations (of which there may be up to three per instruction)
are distinguished by linear address.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/emulate.c
xen/include/asm-x86/hvm/vcpu.h